﻿package com.d4p.util
{
	import flash.display.Sprite;

	public class ShareText extends Sprite
	{
		static private var _ShareTFInstance:ShareText;
		public function ShareText(singletonEnforcer:SingletonEnforcer){}
		
		public static function getShareTFInstance():ShareText
		{
			if(ShareText._ShareTFInstance == null){
				ShareText._ShareTFInstance = new ShareText(new SingletonEnforcer());	
			}
			return ShareText._ShareTFInstance;
		}
		public function createShareTF(url:String, _width:uint, _height:uint, _name:String):String
		{
			var shareTF:String;
			shareTF = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' id='"+_name+"' width='"+_width+"' height='"+_height+"' codebase='http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab'><param name='movie' value='"+url+"'/><param name='bgcolor' value='#000000'/><param name='allowScriptAccess' value='always' /><embed src='"+url+"' bgcolor='#000000' width='"+_width+"' height='"+_height+"' name='"+_name+"' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.adobe.com/go/getflashplayer'></embed></object>"
			return shareTF;
		}
	}
}

class SingletonEnforcer{}